package org.langqiao.jvm.oom;

public class JavaVMStackSOF {
	
	private int stackLength = 1;
	
	public void stack(){
		stackLength ++;
		stack();
	}
	
	public static void main(String[] args) {
		JavaVMStackSOF oom = new JavaVMStackSOF();
		try{
			oom.stack();
		}catch(StackOverflowError e){
			System.out.println("stack length:" + oom.stackLength);
			throw e;
		}
	}

}
